Observational Purity and Encapsulation

نویسنده

  • David A. Naumann
چکیده

Practical specification languages for imperative and object-oriented programs, such as JML, Eiffel, and Spec#, allow the use of program expressions including method calls in specification formulas. For coherent semantics of specifications, and to avoid anomalies with runtime assertion checking, expressions in specifications and assertions are typically required to be weakly pure in the sense that their evaluation has no effect on the state of preexisting objects. For specification of large systems using standard libraries this restriction is impractical: it disallows many standard methods that mutate state for purposes such as caching or lazy initialization. Calls of such methods can sensibly be used for specifications and annotations in contexts where their effects cannot be observed. This paper formalizes a notion of observational purity, justifies the use of weakly and observationally pure methods in specifications, and shows that a method is observationally pure if it simulates a weakly pure method.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Extensions of the theory of observational purity and a practical design for JML

To prevent erratic behavior during runtime checking, JML only allows assertions to call pure, i.e., side-effect free, methods. However, JML’s notion of purity checking is too conservative. For example, Object’s equals method needs to be used in assertions, but some classes use side effects in their equals method to maintain hidden caches or to trigger lazy evaluation, and so these methods canno...

متن کامل

Influence of Nano-SiO2 and BN on Space Charge and AC/DC Performance of Epoxy Nanocomposites

In this paper, the high purity bisphenol-A diglycidyl ether (DGEBA) epoxy resin (D.E.R 332), which is mainly used as filament winding, electrical laminates and encapsulation applications, was used as a host. The epoxy resins were loaded with nano-SiO2 and nano-BN in different loading concentrations, and then test of the AC/DC breakdown strength has been performed. It has been observed that the ...

متن کامل

Thermal Stability of Europium(III) Chelate Encapsulated by Sol-Gel Glass

In order to improve the stability of high color-purity red phosphors for ultraviolet excitation, we encapsulated an Eu-chelate, Eu(HFA)3(TPPO)2, by sol-gel derived glass networks and studied its thermal stability as well as photoluminescence (PL) characteristics. The PL quantum yield of an encapsulated sample was ten times higher than that without encapsulation after annealing at 160 °C for 2 h...

متن کامل

Electrophoretic Deposition of Hydroxyapatite

     The purpose of this study was to investigate the deposition of the hydroxyapatite (HA) coating via the electrophoresis procedure. The HA deposition was performed in an ethanol, methanol, acetone and isopropanol suspension. Methanol was found to be the best deposition media. Among the different environmental conditions, including the encapsulation of the samples under two vacuum types of pr...

متن کامل

A new isolation and purification method for staphylococcal protein A using membrane encapsulated rabbit IgG-agarose.

A new isolation and purification method for bioproducts using membrane-encapsulated affinity adsorbents was investigated. The new method involves encapsulation of affinity adsorbents, batch adsorption of the bioproduct from whole fermentation broth and rapid batch desorption after dissolution of the capsule membranes. Recovery of protein A from Staphylococcus aureus was used as the model experi...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2005